package com.example.javagd.util;

import com.example.javagd.enums.UserPermissionType;

import org.springframework.stereotype.Component;

import lombok.Data;

/**
 * @program: java-general-development
 * @description:
 * @author: hzy
 * @create: 2021-04-07 20:44
 **/
@Component
@Data
public class UserPermissionUtils {

    public UserPermissionType GetUserType(String userId){
        //从数据库获取.创建用户时候，设定权限和id
        return UserPermissionType.ROOT;
    }

    /****
     * 测试用
     * @return
     */
    public UserPermissionType GetRootType(){
        return UserPermissionType.ROOT;
    }

    public UserPermissionType GetUserType(){
        return UserPermissionType.USER;
    }

    public UserPermissionType GetNoUserType(){
        return UserPermissionType.NOUSER;
    }
}
